import request from "@/plugins/axios";
//  客户列表
export function listApi(data) {
  return request({
    url: "/crm/customer/index",
    method: "post",
    data,
  });
}
// 客户创建
export function addApi(data) {
  return request({
    url: "/crm/customer/create",
    method: "post",
    data,
  });
}
//  客户修改
export function saveApi(data) {
  return request({
    url: "/crm/customer/save",
    method: "post",
    data,
  });
}
//  客户删除
export function deleteApi(data) {
  return request({
    url: "/crm/customer/delete",
    method: "post",
    data,
  });
}

//  客户详情
export function detailApi(data) {
  return request({
    url: "/crm/customer/read",
    method: "post",
    data,
  });
}
//  操作记录
export function logsApi(data) {
  return request({
    url: "/crm/customer/logs",
    method: "post",
    data,
  });
}
//  添加标签
export function addLabelApi(data) {
  return request({
    url: "/crm/customerLabel/add",
    method: "post",
    data,
  });
}
//  删除标签
export function deleteLabelApi(data) {
  return request({
    url: "/crm/customerLabel/delete",
    method: "post",
    data,
  });
}
//  添加跟进记录
export function followUpAddApi(data) {
  return request({
    url: "/crm/followUp/create",
    method: "post",
    data,
  });
}

//  跟进记录
export function followUpIndexApi(data) {
  return request({
    url: "/crm/followUp/index",
    method: "post",
    data,
  });
}

// 导出
export function exportApi(data) {
  return request({
    url: "/crm/export/customers",
    method: "post",
    data,
    responseType: "blob",
  });
}

// 批量共享
export function assistApi(data) {
  return request({
    url: "/crm/customer/assist",
    method: "post",
    data,
  });
}

// 批量转移
export function chgOwnerApi(data) {
  return request({
    url: "/crm/customer/chgOwner",
    method: "post",
    data,
  });
}
// 批量退回
export function unObtainApi(data) {
  return request({
    url: "/crm/customer/unObtain",
    method: "post",
    data,
  });
}
